import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    city:"",
    user:"",
    tan:false,
    corder:'',
    shop:"",
    sum:"",
    foods:"",
    dingdan:"",
    serve:"",
    dizhi:{name:"张珊",phone:"1234567"},//选择的地址
    addrouter:"",
  },
  mutations: {
    alter(state,a){
      state.city=a;
    },
    AddUser(state,a){
      state.user=a;
    },
    clicktan(state,a){
      state.tan=a;
    },
    datacorder(state,a){
      state.corder=a;
    },
    datashop(state,a){
      state.shop=a;
    },
    datasum(state,a){
      state.sum=a;
    },
    clickfoods(state,a){
      state.foods=a;
    },
    clickdingdan(state,a){
      state.dingdan=a;
    },
    clickserve(state,a){
      state.serve=a;
    },
    clickdizhi(state,a){
      state.dizhi=a;
    },
    clickaddrouter(state,a){
      state.addrouter=a;
    }
  },
  actions: {},
  modules: {}
});
